This repository was archived by the owner on Sep 5, 2025. It is now read-only.
Merged
Conversation
|
Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes licensing headers across the codebase, extends raw query support with optional variables, adds verbose logging for engine queries, and introduces new geo-type tests along with more comprehensive client pool tests under load.
- Updated license headers to use SPDX format in tests, examples, and API files
- Added
GeoLocationsupport and geo-filter test cases inquery_test.go - Changed
Client.QueryRawsignature/implementation to accept avarsmap and updated related calls - Enhanced engine logging for queries and extended client pool tests (concurrency and stress)
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| util_test.go | Updated license header to SPDX |
| update_test.go | Updated license header to SPDX |
| unit_test/conn_test.go | Updated license header to SPDX |
| query_test.go | Defined GeoLocation, added geo-filter tests, updated raw calls |
| insert_test.go | Updated license header to SPDX |
| examples/readme/main.go | Updated license header to SPDX |
| examples/basic/main.go | Updated license header to SPDX |
| engine.go | Added logger.V(2).Info for namespace queries |
| delete_test.go | Updated license header to SPDX |
| cmd/query/main.go | Passed nil for new vars param in QueryRaw call |
| client_test.go | Added client-pool concurrency & stress tests |
| client.go | Extended QueryRaw to accept vars, switched to Context txn |
| api/types_test.go | Updated license header to SPDX |
| api/types.go | Updated license header to SPDX |
| admin_test.go | Updated license header to SPDX |
Comments suppressed due to low confidence (3)
client.go:353
- [nitpick] The local variable
clientshadows the receiverc, which can be confusing. Consider renaming the pooled connection to something likedgraphClientorconn.
client, cleanup, err := c.pool.get(client)
query_test.go:67
- [nitpick] The field name
Coordis less descriptive thanCoordinatesand already maps to the JSON tagcoordinates. Renaming toCoordinateswould improve clarity.
Coord []float64 `json:"coordinates"`
query_test.go:236
- Currently this new test exercises only the Dgraph client mode. Consider adding a similar
QueryRawWithVarstest for the engine-backed client (e.g., usingfile://URI) to ensure variable binding works in both modes.
t.Run("QueryRawWithVars", func(t *testing.T) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ryanfoxtyler
approved these changes
May 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds additional tests for geo types and client pool operation under load
Checklist